<?php

require_once Kohana::find_file('libraries', 'commonConstant');

/**
 *
 * Enter description here ...
 * @author admin
 */
class UserList_Model extends LawsBase_Model {

	/**
	 * コンストラクタ
	 */
	public function __construct() {
		parent::__construct();
	}

	/**
	 * 実行メソッド
	 */
	public function execute(PHPTAL $template) {
		$template->title = '● ユーザ一覧画面 ●';
		$template->userId = 'hogehoge';
		$template->userName = 'hogehogehogehoge';
		$template->userList = ORM::factory(LawsUser_Model::$MODEL_NAME)->find_all();
		$template->rows = '人';

		// ユーザ一覧画面のテンプレートを取得
		$template->setSource(parent::$tempStore->getTemplate(C_USER_LIST));
		echo $template->execute();
	}
}